/*
Copyright (C) 2021-2025 Casa Xu (also Zhiyan Xu) from HIT

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
*/

/*
 * LOS_UART.c
 *
 *  Created on: 2022年3月26日
 *      Author: Casa XU
 */

#include "LOS_UART.h"

 

void LOS_UART_Transmit(uint8_t UART_NUM,uint8_t* data, uint32_t length)
{
    sciBASE_t * sciREG = sciREG4;
    
    if (UART_NUM==4)   //只使用串口4，仅调试时使用
    {
        sciREG = sciREG4;
    }
    else
    {
        sciREG = sciREG4;
    }

    sciSend(sciREG,length,data);

}

void LOS_UART_SetBaudrate(uint8_t UART_NUM, uint32_t baud)
{
    sciBASE_t * sciREG = sciREG4;
    if (UART_NUM==4)   //只使用串口4，仅调试时使用
    {
        sciREG = sciREG4;
    }
    else
    {
        sciREG = sciREG4;
    }
    sciSetBaudrate(sciREG,baud);
}

